<h1><?=$this->translate->_('header_be_boards')?></h1>

<form action="" method="post" onsubmit="document.location.href='board-' + document.getElementById('board_uid').value + '.html'; return false;">
	<p class="form_cell">
		<label for="board_uid"><?=$this->translate->_('admin_boards')?></label>
			<select name="board_uid" id="board_uid">
				<option value=""><?=$this->translate->_('form_choose')?></option>
				<?if($this->cats_count > 0):?>
					<?foreach($this->cats_res AS $result):?>
						<option disabled="disabled"><?=$this->escape($result['title'])?></option>
						<?if($this->GetBoards($result['uid'])->count() > 0):?>
							<?foreach($this->GetBoards($result['uid'])->toArray() as $bResult):?>
								<option value="<?=$bResult['uid']?>" style="padding-left:20px;"><?=$this->escape($bResult['title'])?></option>
							<?endforeach;?>
						<?endif;?>
					<?endforeach;?>
				<?endif;?>
			</select>
		<br />
		<span><?=$this->translate->_('admin_boards_desc')?></span>
	</p>
	<p><input type="submit" value="<?=$this->translate->_('form_submit')?>" /></p>
</form>

<p>
	<a href="<?=$this->url(array('module' => 'backend', 'controller' => 'boards', 'action' => 'add'), 'be_boards_add', true)?>">
		<?=$this->translate->_('admin_boards_add')?>
	</a>
</p>